<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
    <script type="text/javascript">
        const p = new Promise((resolve, reject) => {
            setTimeout(() => {
                resolve("OK");
                // reject("Error");
            }, 1000);
        });
        
        p.then((val) => {
            console.log(111);
            // 中断promise链条，有且只有一种方法：返回一个pending状态的promise对象
            return new Promise((resolve, reject) => {

            });
        }).then((val)=>{
            console.log(222);
        }).then((val)=>{
            console.log(333);
        }).catch((err)=>{
            console.warn(err);
        });
    </script>
</body>
</html>